namespace Pronghorn.Core
{
	public class StyleNodeVisitor : INodeVisitor
	{
		private bool isStyle(string line)
		{
			return line.Contains("<!--#{styles}-->");
		}

		private string parse(string line)
		{
			if (!isStyle(line)) return line;
			return "RenderCss(writer);\r\n";
		}

		public void Visit(ISkinNodeParser skinNodeParser)
		{
			skinNodeParser.Line = parse(skinNodeParser.Line);
		}
	}
}